home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / _archvrs / unix / comp430 / readme4.3 < prev    next >
Text File  |  1990-01-17  |  17KB  |  331 lines

  1. $@(#) compress readme4.3  90/01/18 03:00:00 don Release ^
  2. Compress version 4.3  changes:
  3.  
  4. (01/18/90)
  5. Found and corrected a problem with decompression. If there is a character
  6. that repeats more that 128k time, then it would over-run the token buffer.
  7. Made token buffer in decompress() dynamic.
  8.  
  9.  
  10. (01/06/90)
  11. Corrected compiler anomoly on some systems. First reported with compiling
  12. compress on the Tandy 6000 computer with the 3.2 development system. It
  13. appears that the compiler sign extends regardless of cast on certain
  14. operations. This caused the program to fail after the shift to 16 bits. It 
  15. would eventually address memory outside of its space. A quick test if your
  16. compiler has this problem is to compile with DEBUG and NOSIGNAL defined. The
  17. result will be a bad token on decompress AND a core dump on signal 0x1a
  18. on compress. So far only cpu's in the 68000 family and certain compilers
  19. exhibit this anomoly. It is corrected in this release. If the correction 
  20. does not seem to work for your system, please contact the author.
  21.  
  22. (12/25/89)
  23. Corrected pointer dereference in error reporting.
  24.  
  25. (10/02/89)
  26. Changed the many #ifndef NDEBUG to #ifdef DEBUG. It was pointed out that
  27. the double negative sometimes makes tracking code less clear. Compiling
  28. the program with neither NDEBUG or DEBUG defined will default to a 
  29. debug included version. If -DNDEBUG is defined on compile, then the
  30. debugging code is left out. Defining -DDEBUG is an essential no op, since
  31. it defaults to on. The test for this was added to compress.h.
  32.  
  33. (9/09/89)
  34. Due to requests on the file testing logic, the test for linkages is now
  35. done before compression. Before, it was done after the compression and if 
  36. a file was linked, the compress was aborted. Wasted processing time for 
  37. an essential no-op.
  38.  
  39. The defines for various models and system binaries was getting horendous
  40. with each added port. Now there is a define added to make the port name in 
  41. the compress.h file. The version() function has been cleaned up a lot for
  42. that.
  43.  
  44. Included a new define to include or exclude the code for processing the 
  45. -I and -O path options. These options are nice for many purposes, and expansion
  46. of the original specs for compress. However, they are added code for those
  47. who use scripts that don't access these abilities. They can be excluded to
  48. make the utility smaller.
  49.  
  50. NOTE! The new btoa utility is backward compatible, but as distributed
  51. will not make files that are usable with the old utility. So a slightly
  52. ported btoa is again included with this compress shar archive. This archive
  53. now includes all the old scripts for tarmail, etc. Installation instructions
  54. are separated out in the file Installation. This is for those who have not
  55. used compress before and are confused on the various files and linkages
  56. to make the package work.
  57.  
  58. (5/20/89)
  59. NOTE! As there is now a new btoa utility on usenet that is backward
  60. compatible with the old one, the source code for the old btoa/atob
  61. is no longer provided with compress.
  62.  
  63. (5/20/89 -- incorportated changes for Minix version port. These changes
  64. were made by Dale Schumacher. The following information on these changes
  65. were submitted by Dale:
  66.  
  67. The enclosed files are the COMPRESS v4.3 file compression utility
  68. with modifications to compile Minix-ST v1.1 with the ACK compiler.
  69. This version supports compression/decompression with up to 16 bits.
  70. It probably WON'T work (at least for >13 bit compression) under
  71. Minix-PC.
  72.  
  73.                                 Dale Schumacher
  74.         bungia!midgard.mn.org!syntel!dal -or- dal@syntel.UUCP
  75.  
  76. Notes on compilation with Sozobon C:
  77.  
  78. There are several instances of the '#if defined()' pre-processor
  79. directive scattered through the code.  I've converted all such
  80. references to standard '#ifdef' or '#ifndef' directives, which is
  81. consistent with most of the existing code.
  82.  
  83. Notes on the port to MINIX-ST:
  84.  
  85. The get_one() function fails because MINIX won't support the dubious
  86. practice of reading from fd=2 (aka stderr).  Instead, "/dev/tty" is
  87. opened and read from directly.  This may not be the best way to handle
  88. this problem, but it works.  I took the example from the Minix
  89. distribution sources (compress.c,v 4.1 85/12/05 09:00:00 kent).
  90.  
  91. The defaults for the version of compress which was supplied with the
  92. MINIX-ST 1.1 distribution are apparently quite different from those
  93. of current Unix implementations.  I've added a compile-time switch
  94. to allow 'verbose' to be default TRUE.  I've also taken advantange
  95. of the switch for making 'keep source' also default TRUE.  The comments
  96. in the code imply that both of these options are typically defaulted
  97. to FALSE, but I've chosen to remain as close to the original compress
  98. as possible.  Similarly, the default number of bits to use is 13,
  99. although up to 16 will work properly.
  100.  
  101. In order to do 16-bit compression, you must "chmem =400000 compress".
  102. If you still get a "not enough memory to compress" error, bump the
  103. chmem value up a bit more.  If you only want to use 13 bits maximum
  104. for compression, "chmem =65000" seems to be sufficient.  Decompression
  105. takes far less space, so 16-bit decompression can be done even with
  106. the smaller chmem value.  You may even be able to make the value
  107. smaller and still do decompression, but the initial value from the
  108. compiler of about 45000 is not large enough to compress with 13 bits.
  109.  
  110. Just for peace-of-mind, I have verified that this compress can
  111. decompress files created with the original compress, and the
  112. original compress can decompress files created with this new
  113. compress, as long as you don't use more than 13 bits (of course).
  114. ===============  end of Dale's notes ================
  115.  
  116. None to the basic algorithm. Fixed some bugs of where the output files should
  117. go. Fixed bug with file name > 12 characters. Fixed problem with Atari ST
  118. version. Made ready for release on usenet.
  119.  
  120. Compress version 4.2  changes:
  121.  
  122. Put adaptive reset back in this version. However, including it is controlled
  123. by the COMP40 define. The reason for this is that large files that get to
  124. the highest maxbit will not compress as small as the current version 4.0.
  125. However, they are completely compatible on decompress. If you define COMP40
  126. it will include the code for adaptive reset of the tables. However, it will
  127. slow processing time down somewhat. So the decision on speed or size is the
  128. user's. The source code is compiled for default of speed; i.e. COMP40 is not
  129. defined.
  130.  
  131. Caught some last minute bugs with unix version. Cleaned up for public
  132. release. Version appears very stable at this point. Found the rest of the
  133. if defined() structs.
  134.  
  135. The full package for compress also includes shell scripts for compressdir,
  136. uncompressdir, tarmail, untarmail, etc.  These can be found in the
  137. Compress 4.0 mod.sources (part 2 of 2). Btoa and Atob source code were
  138. modified and included as the original did not compile properly on some
  139. machines.
  140.  
  141. Compress.man is a formatted manual page reflecting the 4.2 compress.
  142. Compress.1 is a nroff formatted manual page.
  143.  
  144. (On Compuserve Unixforum, they are included in the library file compr2.sh)
  145. (In the compress.zoo file the compr2.sh file is added for those who need
  146. it. It is in unix line format. The rest of the files need to be converted
  147. to run properly on unix. The text files should be processed as follows:
  148.         tr -d '\015' <file_name >file_name.n
  149.         mv file_name.n file_name
  150.  
  151. Compress version 4.1f changes:
  152.  
  153. Thanks to Jim Boys for trying out a lot of options and compiling and
  154. recompiling compress for most of a day. Because of this, xenix version now
  155. compiles and runs properly. Xenix system 2.2.1.  Refined macros in compapi.c
  156. and adjusted for some implementations use of int instead of void for signal().
  157.  
  158. Thanks to Noel Bergman for testing under os/2. Changes made to the error and
  159. unlinking routines led to a more robust coding.
  160.  
  161. Compress version 4.1e changes:
  162.  
  163. The program now compiles with all Unix compress defaults. This means that
  164. existing scripts for unix compress will work as expected. For msdos users,
  165. this means that entering the command alone will wait for input. It works as a
  166. straight filter program now. Without command line options it expects
  167. redirection.  You can still use -h or -? to view the command options.
  168.  
  169. Also, the input files are now unlinked, as expected on the unix system. This
  170. is done on successful completion of compress and uncompress. On Zcat, no
  171. unlinking takes place.
  172.  
  173. Other changes have been in the makefile and fine tuning the header and source
  174. to be more compatible with more compilers. Some errant casts have been taken
  175. care of.
  176.  
  177. Compress version 4.1d improvements:
  178.  
  179.         o Improved the interface some more. Some files were being unlinked
  180.           when errors were discovered. Changed testing for enough memory for
  181.           expansion/compression.
  182.  
  183.         o The compressed files are totally compatible with the existing
  184.           implementation of compress v.4 joe release.
  185.  
  186. Note, the header file and the make files need some work for other compilers
  187. and operating systems. Please leave me a messsage via the contact information
  188. at the end of this file. I need to know specific system dependent functions
  189. and header files to make compiling easier.
  190.  
  191. COMPRESS file compression utility for various computer operating systems. This
  192. version of the source code keeps to the existing program calling conventions
  193. of the Unix version, generates compatible compressed files and will uncompress
  194. Unix files up to 16 bit compression. The reason for this project was first to
  195. port to the MSDOS environment.
  196.  
  197. Later on, Lyle Rains worked on the compression and decompression routines. Not
  198. only did he optimize them a great deal, it now is able to keep tables in 64K
  199. chunks. This is essential on segmented address machines, both to keep the use
  200. of huge pointers out of the program and eliminate the need for 32 bit
  201. arithmetic. Another effect of these changes is that the limitation on bits is
  202. not dependent on 16 bit cpu's.
  203.  
  204. Finally, this code is released with the expectation that it will compile on
  205. any platform that uses a C language compiler. However, during testing, we
  206. only had access to some systems. We would appreciate any comments regarding
  207. changes needed to compile properly on different operating system platforms.
  208.  
  209. The philosophy behind splitting up the source code as it is, is to make
  210. porting and upgrading more easily done. The main logic involved in the
  211. utility is in compress.c, this also tests all the files and options, and opens
  212. any needed files by freopens() to stdin and stdout.  The initial reads or
  213. writes are done to the file, and the files are passed to the API for the
  214. actual compression and decompression.  The compusi.c module is support for the
  215. interupt routines and the various functions to deal with file naming
  216. conventions.
  217.  
  218. Modified atob.c btoa.c source code is included. The original did not cast
  219. constants to longs and thus had bad code output with some compilers. Now
  220. fixed. Also, on some operating systems, you can not unlink a file and continue
  221. to use the file. This would cause lost clusters. The unlinking of the temp
  222. file is now done at the end of the program.
  223.  
  224. You should look closely at the COMPRESS.H file to see what defines you will
  225. need for your system.  The COMPAPI.C file is fairly standard and should have
  226. no problems with most current compilers.  There are two User System Interface
  227. files:
  228.  
  229.         COMPUSI.UNI is for unix/xenix system and compiler. Since it is a unix
  230.         like operating system, that is the file that should be renamed to
  231.         compusi.c for compiling. The major things to check for on this port
  232.         are the signal calls, to make sure they are appropriate for your
  233.         system.
  234.  
  235.         COMPUSI.DOS is for the MS/PCDOS operating system. The system's
  236.         path and naming conventions are the particular concern here. Also
  237.         check on the signal() calls. Microsoft C version 5.1 was the
  238.         compiler it was written for. In version 4.0, one of the signal
  239.         defines is not supported. Please check your compiler's documentation
  240.         for compatibility. The other problem may be some of the string
  241.         routines. They are ANSI compatible and the compilers we used to
  242.         test it supported them. However, you may have to rewrite the
  243.         functions. Atari ST, with the Mark Williams Compiler support was
  244.         added.
  245.  
  246. For the most part, COMPRESS.C uses very standard library functions, or
  247. calls system specific functions from the compusi.c file.  You should read the
  248. header file to decide which defines your system needs. Also rename either
  249. compusi.uni or compusi.dos as a starting point. The major differences is their
  250. support of operating system directory naming conventions. You may have to
  251. change some of the code.  If you port the compusi.xxx to another operating
  252. system, we would appreciate a copy of the file to include in the distribution.
  253.  
  254. Compiling: Please see the make files included for various compilers and
  255. systems. Use your compiler's optimizing switch for maximum optimization. If
  256. you have a problem, first turn the optimizing off and see if the program
  257. works. If you still have a problem, let us know.
  258.  
  259. For segmented addressing machines, 16 bit varieties, the program was designed
  260. to run compiled with near code and data, but far pointers for the compression
  261. and decompression buffers. These are allocated in COMPUSI.C using emalloc()
  262. function. You may (probably will) have to change your compiler's name for
  263. the routine that allocates far pointers. If you can't, then you must compile
  264. the program in the compact model with far pointers as a default.
  265.  
  266. INSTALLATION: The program reads it's own name in most implementations.
  267. If it doesn't, (Versions of MSdos less than 3.x are one), then you must
  268. use command line options to decompress or 'cat' files.  Otherwise, if your
  269. system allows filename links, as in Unix/Xenix, do something like the after
  270. compilation, move "compress" to a standard executable location, such as
  271. /usr/local and link under uncompress and zcat.  Thus:
  272.  
  273.         mv compress /usr/local
  274.         cd /usr/local
  275.         ln compress uncompress
  276.         ln compress zcat
  277.  
  278. If you are using MSDOS version 3.x, then copy compress.exe to uncomp.exe and
  279. to zcat.exe.  Once this is done, the program will understand it's default
  280. operating options.
  281.  
  282. To get all the options and what the current defaults are, use the command:
  283.         compress -h
  284.  
  285.  
  286. Compress version 4.10b : Combined effort by Lyle Rains and Don Gloistein.
  287. Now should be useful on both MsDos machines and Unix platforms. If there are
  288. portability problems with compiling on Unix, please contact me with the
  289. portability issues.
  290.  
  291.     o See the source and header files for other bug swats.
  292.     o Added some defines to accomodate various compilers and operating
  293.       systems. Attempted to keep the coding compatible with the current
  294.       ANSI standards.
  295.     o Fixed my bug in detecting extension if the '.' character is used in the
  296.       MsDos system.
  297.     o Lyle Rains' work on a modified algorithm for compression and
  298.       decompression is incorporated. This will change some file sizes and the
  299.       final code of some compressed files. But don't worry. Either the
  300.       existing compress v4 or this one will decompress the file. The reason
  301.       for the difference is that the compression ratio is not checked in this
  302.       version. It saves time in compression with, we feel, minimum sacrifice
  303.       to compression.
  304.     o Xenix should be able to compile it as is now.
  305.     o Various unix systems should be able to compile it with minimum changes
  306.       to the code. Use the COMPUSI.UNI as the starting point. The other
  307.       changes should be evident in the COMPRESS.H file. PLEASE READ THAT FILE
  308.       BEFORE COMPILING.
  309.  
  310. Note:  The following comments and history are provided for background. This
  311. implementation changes much of the Dos information.  The archive file
  312. containing this source code also contains the following program sources:
  313.         btoa - convert binary to ascii for mailing
  314.         atob - convert ascii to binary with checksum
  315.  
  316.                                         regards,
  317.                                         don
  318. Please contact me if you have suggestions, comments or bug reports. I can
  319. be reached by the following:
  320.  
  321. Full-Name:  Donald Gloistein
  322. US Mail:    DGWare Consulting; P.O. Box 669, Alvin, TX 77512-0669
  323. CompuServe: Unixforum 76010,474
  324. Phone:      (713)331-9372
  325.  
  326. UUCP:       Pete Holsberg has agreed to receive uucp mail for us. You may
  327.             reach Lyle or myself via:
  328.             !rutgers!princeton!mccc!pjh
  329.  
  330.  
  331.